package com.sise.controller;

import com.sise.bean.CodeMsg;
import com.sise.bean.OrderMasterBean;
import com.sise.service.IOrderMasterService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zj
 */
@RestController
@RequestMapping("/sise/order-master")
public class OrderMasterController {

    @Resource
    private IOrderMasterService iOrderMasterService;

    @RequestMapping("/findAllOrder")
    public List<OrderMasterBean> findAllOrder() {
        return iOrderMasterService.findAllOrder();
    }

    @RequestMapping("/orderStatusPaidCount")
    public CodeMsg orderStatusPaidCount() {
        return iOrderMasterService.orderStatusPaidCount();
    }

    @PostMapping("/deliveryAndCompletion")
    public CodeMsg<String> deliveryAndCompletion(String[] orderIdList, Integer status) {
        return iOrderMasterService.deliveryAndCompletion(orderIdList, status);
    }
}
